<template>
  <el-form-item v-for="item in redactFormVal.attrs" :key="item.attr_id" :label="item.attr_name" prop="productWeight">
    <el-input v-model="item.attr_vals"></el-input>
  </el-form-item>
</template>

<script lang="ts">
import { defineComponent, computed } from 'vue'
import { ProductListRedactProps } from '@/store/storeType'
import { useStore } from '@/store'

export default defineComponent({
  setup() {
    const store = useStore()
    const redactFormVal = computed<ProductListRedactProps>({
      get: () => store.state.productList.redactModule.redactData,
      set: val => (store.state.productList.redactModule.redactData = {...store.state.productList.redactModule.redactData, ...val})
    })
    return { redactFormVal }
  },
})
</script>
